package robocup.component.infotypes;

/**
 * This info is received by the coach, if he hears the say-messages of a player.
 */
public class CoachPlayerSayInfo
    extends AuralInfo {

  /**
   * The heared message.
   */
  private String message;

  /**
   * The senders tricot number (of the own team).
   */
  private int    playerNumber;

  /**
   * Constructs an info-object for a heared message of another player
   * 
   * @param iCycle -
   *          when was it heared
   * @param iPlayerNumber -
   *          from whom was it heared
   * @param iMessage -
   *          what was heared
   */
  public CoachPlayerSayInfo(
      final int iCycle,
      final int iPlayerNumber,
      final String iMessage) {

    super(iCycle);
    this.playerNumber = iPlayerNumber;
    this.message = iMessage;
  }

  /**
   * @return Returns the Playernumber.
   */
  public double getPlayerNumber() {

    return this.playerNumber;
  }

  /**
   * @return Returns the message.
   */
  public String getMessage() {

    return this.message;
  }

  /**
   * @return Returns a readable string containing the infos conatined in this
   *         object.
   */
  @Override
  public String toString() {

    return ("PlayerMessage: " + this.playerNumber + ", " + this.message);
  }
}
